class Name : public Serializable {
   friend ostream& operator <<(ostream&, const Name&);

   string label;
   int id_num;

public:
   Name(const string& s) : label(s), id_num(getUniqueID()) {}

   void toVec(vector<byte>& vec) {
      serialize(vec, label);
      serialize(vec, id_num);
   }

   void fromVec(iterator<byte>& it, iterator<byte>& end) {
      unserialize(it, end, label);
      unserialize(it, end, id_num);
   }
}

ostream& operator <<(ostream& os, const Name& s) {
   return os << s.label; 
}
